writestr(fname, str)
Write str to an ASCII file.
fname | string | name of file |
str | string|cellstr | Text to be saved. Either char matrix; cell array; or string array. Matrix ==> each row will appear on separate line, spaces at the end of each line are omitted. Cell array , String array ==> each line will appear on separate line All ==> \n is used as line separator. Output fille is opened in text mode, on Windows systems this will take care of inserting \r (return) before each \n (newline) symbol |
none (file is created, or error)
hwin=ticp hwait=waitbar(0,'Generate report'); strs={}; for k=1:N waitbar((k-.5)/N,hwait); strs{end+1}=makeReportLine(k,....); end writestr(fname,strs(:)); <<<Note! vertical concatination is needed to create multiline report close(hwait); tocp SEE ALSO: readstr